<template>
  <div class="set-up">
    <div class="set-up-item clearfix" @click="gotoPage"><span class="set-up-text">修改密码</span><i class="more"></i></div>
    <!-- <div class="set-up-item clearfix" @click="clearCashe"><span class="set-up-text">清除缓存</span><span class="cashe">0.99M</span></div> -->
    <div class="set-up-item sign-out" @click="signOut()">退出登陆</div>
  </div>
</template>

<script>
  import axios from 'axios'

  export default {
    name: 'set-up',
    data: function() {
      return {

      }
    },
    methods: {
      clearCashe() {
        location.href = "http://debugtbs.qq.com"
      },
      gotoPage() {
        location.href = "/forgetPwd.html?type=3"
      },
      signOut() {
        axios.post('/login/logout').then(() => {
          location.href = "/homepage.html"
        })
      }
    }
  }
</script>

<style lang="less">
  @import '~COMMON/common.less';
body {background-color: #f4f6f8;margin: 0px;padding: 0px;}
  .set-up {
    .set-up-item {
      background-color: #fff;
      padding-left: 26px;
      padding-right: 18px;
      line-height: 54px;
      text-align: right;
      font-size: 16px;
      color: #333;
      margin-bottom: 1px;
      &:active {
        background-color: #eaeaea;
      }
      .set-up-text {
        float: left;
      }
      .more {
        display: inline-block;
        vertical-align: middle;
        width: 6px;
        height: 13px;
        background-image: url(~IMGS/more.png);
        background-size: 100%;
        background-repeat: no-repeat;
      }
      .cashe {
        color: #999;
      }
    }
    .sign-out {
      text-align: center;
      margin-top: 10px;
      color: #D0021B;
    }
  }
</style>